﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace ImageAcquisitionTAL
{
    public class NoTechnology : IAcquisitionTechnology
    {
        #region IAcquisitionTechnology Members

        public IEnumerable<ScannerInfo> GetInstalledScanners()
        {
            ScannerInfo Dummy = new ScannerInfo();
            Dummy.DeviceID = "";
            Dummy.DisplayName = "No scanner (dummy scanner)";
            Dummy.Technology = this;
            return new List<ScannerInfo>(new ScannerInfo[] { Dummy });
        }

        

        public ScannerInfo GetScannerInfo(string deviceId)
        {
            ScannerInfo Dummy = new ScannerInfo();
            Dummy.DeviceID = "";
            Dummy.DisplayName = "No scanner (dummy scanner)";
            Dummy.Technology = this;
            return Dummy;
        }


        public bool IsAvailable()
        {
            return true;
        }

        public Image Acquire(ScannerInfo scanner)
        {
            return Resource.frog;
        }

        public Image AcquireForPreview(ScannerInfo scanner)
        {
            throw new NotImplementedException();
        }

        public string Name
        {
            get 
            {
                return "Scanning  simulator";
            }
        }
        bool sessionStarted;

        public object BeginAcquire(ScannerInfo scanner)
        {
            sessionStarted = true;
            return sessionStarted;
        }

        public void EndAcquire(object session)
        {
            sessionStarted = false;
        }

        #endregion
    }
}
